


/*解密*/
var base64Decode = function (str) {
    return decodeURIComponent(decodeURIComponent(atob(decodeURIComponent(str)).split('').map(function (c) {
        return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
    }).join('')));
}
/*加密*/
var base64Encode = function(str) {
    return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {
        return String.fromCharCode('0x' + p1);
    }));
}



export default {
    base64Decode,
    base64Encode
}